//
//  PQNavigationController.m
//  PaiQuan
//
//  Created by Mac on 16/7/6.
//  Copyright © 2016年 huigu. All rights reserved.
//

#import "PQNavigationController.h"

@interface PQNavigationController ()

@end

@implementation PQNavigationController

- (void)viewDidLoad {
    [super viewDidLoad];
   
    
    

   
        
    
}
-(UIStatusBarStyle)preferredStatusBarStyle{
    return UIStatusBarStyleLightContent ;
}
- (void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated
{
    
    
    if (self.viewControllers.count > 0) { // 此时push进来的viewController是第二个子控制器
        // 自动隐藏tabbar
        viewController.hidesBottomBarWhenPushed = YES;
              
        // 定义leftBarButtonItem
        UIBarButtonItem *returnButtonItem = [[UIBarButtonItem alloc] init];
        returnButtonItem.title = @"返回";
        self.navigationItem.backBarButtonItem = returnButtonItem;
        
        
    }
        // 调用父类pushViewController，self.viewControllers数组添加对象viewController
    [super pushViewController:viewController animated:animated];
}



- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}


@end
